export interface ResponseData{
  code:number,
  message:string,
  ok:boolean
}
// 定义SKU对象的ts类型
export interface Attr{
  attrId:string|number, //平台属性id
  valueId:string|number, //属性值id
  id?:number,
  // valueName?:string,
}
export interface saleAttr{
  saleAttrId:string|number, //销售属性id
  saleAttrValueId:string|number, //属性值id
  id?:number,
  // saleAttrName?:string,
}
// 新增sku的ts类型
export interface SkuData{
  category3Id?:string|number, //三级分类id
  spuId?:string|number, //已有spuid
  tmId?:string|number, //spu品牌id
  skuName?:string, //sku名字
  price?:string|number, //sku价格
  weight?:string|number, //sku重量
  skuDesc?:string, //sku描述
  skuAttrValueList?:Attr[], //平台属性
  skuSaleAttrValueList?:saleAttr[], //销售属性
  skuDefaultImg?:string, //sku图片地址
  isSale?:number, //商品上架与下架
  id?:number,
}
// 获取SKU接口返回的数据的ts类型
export interface SkuResponseData extends ResponseData{
  data:{
    records:SkuData[],
    total:number,
    size:number,
    current:number,
    orders:[],
    optimizeCountSql:boolean,
    hitCount:boolean,
    countId:null,
    maxLimit:null,
    searchCount:boolean,
    pages:number
  }
}

// 商品详情接口ts类型
export interface SkuInfoData extends ResponseData{
  data:SkuData
}